#include "Coordinate.h"
#include "stdio.h"

void Coordinate::setValue(double Value)
{
	this->Value = Value;
}

void Coordinate::setEncodedValue(unsigned short EncodedValue)
{
	this->EncodedValue = EncodedValue;
}

double Coordinate::getValue(void)
{
	return Value;
}

unsigned short Coordinate::getEncodedValue(void)
{
	return EncodedValue;
}

void Coordinate::printEncodedValue(void)
{
	unsigned short usFlag = 1 << (sizeof(EncodedValue) * 8 - 1);
	for(int i=0; usFlag > 0; usFlag >>= 1, i++)
	{
		if(i==8)
			printf(".");
		printf("%d", EncodedValue & usFlag ? 1 : 0);
	}
	printf(" . ");
}
